p=0
i = 0
p2=0
import random
def getKard():    

    

    mykard = input()

    if mykard != ('לא' or 'no'):
        mykard = int(mykard)
        mykard = mykard - 1
        return mykard

        
    else:
        return mykard    


KARDS = ['''
 +--------------+
 |     /|       |
 |    / |       |
 |   /  |       |
 |      |       |
 |      |       |
 |      |       |
 |      |       |
 |              |
 |              |
 |              |
 +--------------+''','''

 +--------------+
 |   /------|   |
 |   |      |   |
 |   |      /   |
 |         /    |
 |        /     |
 |       /      |
 |      /       |
 |     /        |
 |    +------   |
 |              |
 +--------------+''','''

 +--------------+
 |  3 3 3 3 3   |
 |              |
 |  3       3   |
 |              |
 |  3       3   |
 |              |
 |  3       3   |
 |              |
 |  3 3 3 3 3   |
 |              |
 +--------------+''','''

 +--------------+
 |   |     |    |
 |   |     |    |
 |   |     |    |
 |   |-----|    |
 |         |    |
 |         |    |
 |         |    |
 |         |    |
 |              |
 |              |
 +--------------+''']

while True:

    if i < 1:
        yorkards1 = random.randint(0, 3)
        yorkards2 = random.randint(0, 3)
        yorkards3 = random.randint(0, 3)
        derkards = random.randint(0, 3)
    
    print(KARDS[yorkards1], end=' ')
    print(KARDS[yorkards2], end=' ') 
    print(KARDS[yorkards3])

    mykard = getKard()

    print(KARDS[mykard],end=' ')
    print('          ',end=' ')
    print(KARDS[derkards])

    if derkards > mykard:
        p2 = p2 + 1

    if derkards < mykard:
        p = p + 1

    if mykard == ('לא' or 'no'):
        break

    
    print('  יש לכה ')
    print(p)
    print(mykard + 1)
    print(' ליריב יש ')  
    print(p2)
    print(derkards + 1)
    print(yorkards1 + 1)
    print(yorkards2 + 1)
    print(yorkards3 + 1)

    
    if p == 3:
        print('ניצחת\ה')
        break



    
    
    elif p2 == 3:
        print('הפסדת\ה')
        break

    if yorkards1 + 1 == mykard:
        yorkards1 = random.randint(0, 3)

    if yorkards2 + 1 == mykard:
        yorkards2 = random.randint(0, 3)

    if yorkards3 + 1 == mykard:
        yorkards3 = random.randint(0, 3)

    i = 1



